package darknet.application;

import darknet.core.spec.net.NetworkManager;
import darknet.core.spec.net.Node;
import darknet.core.spec.net.Protocol;
import darknet.core.spec.net.ProtocolHandler;
import darknet.core.spec.net.ProtocolSender;
import java.util.Set;

/**
 * An application.
 * 
 * @author Yoyo
 */
public interface Application {
    
    /**
     * Get the protocol of the application.
     * @return
     */
    Protocol getProtocol();

    /**
     * Get the network manager.
     * @return
     */
    NetworkManager getNetworkManager();
    
    /**
     * Get the handler for this application
     * @return
     */
    ProtocolHandler getHandler();
    
    /**
     * Get the sender for this application
     * @return
     */
    ProtocolSender getSender();

    /**
     * Get all online nodes which this application is install.
     * @return
     */
    Set<Node> getReachableNodes();
}
